package com.anjubao.parking.municipal.parkinglot.mapper;

import com.anjubao.parking.municipal.parkinglot.dto.ParkingGeomagneticResDto;
import com.anjubao.parking.municipal.parkinglot.dto.ParkingGeomagneticSearchDto;
import com.anjubao.parking.municipal.parkinglot.model.ParkingLotDeviceGeomagneticSensor;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 地磁设备mapper
 * @author anjubao
 */
@Mapper
public interface ParkingGeomagneticMapper extends BaseMapper<ParkingLotDeviceGeomagneticSensor> {

    /**
     * 搜索地磁信息(分页)
     * @param parkingGeomagneticSearchDto
     * @param formPage
     * @return
     */
    List<ParkingGeomagneticResDto> search(@Param("parkingGeomagneticSearchDto")ParkingGeomagneticSearchDto parkingGeomagneticSearchDto,
                                          @Param("formPage")Page<ParkingGeomagneticResDto> formPage);

    /**
     * 根据车场code获取安装了地磁的泊位id列表
     * @param parkingLotCode
     * @return
     */
    List<Long> selectGeomagnetic(String parkingLotCode);
}
